package com.shuai.frame.fault.tolerate.impl;

import com.shuai.frame.fault.tolerate.TolerateStrategy;
import com.shuai.frame.model.RpcResponse;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;


/**
 * Fail-Safe Tolerant Strategy
 * 静默处理异常 -- 容错策略
 */
@Slf4j
public class FailSafeTolerantStrategy implements TolerateStrategy {

    @Override
    public RpcResponse doTolerate(Map<String, Object> context, Exception e) {
        log.info("静默处理异常", e);
        return new RpcResponse();
    }
}